//package com.hnuc.ch;
//
//import java.io.BufferedReader;
//import java.io.File;
//import java.io.InputStream;
//import java.io.InputStreamReader;
//import java.io.PrintWriter;
//import java.net.MalformedURLException;
//import java.net.URL;
//
//import android.os.Environment;
//import android.test.AndroidTestCase;
//import android.util.Log;
//
//public class TestRss extends AndroidTestCase {
//	public void test() throws Throwable{
//		File f = new File(Environment.getExternalStorageDirectory(),"rss.xml");
//		URL url = new URL("http://news.163.com/special/00011K6L/rss_newstop.xml");
////		RssParser parser = new RssParser(url.openStream());
////		Log.i("rss", parser.getItems().size()+"");
//		InputStream ips = url.openStream();
//		BufferedReader r = new BufferedReader(new InputStreamReader(ips));
//		PrintWriter pw = new PrintWriter(f);
//		String line= null;
//		while((line=r.readLine())!=null){
//			pw.println(line);
//		}
//		pw.close();
//		ips.close();
//	}
//	public void test1() throws Exception{
//		URL url = new URL("http://news.sohu.com/rss/pfocus.xml");
//		
//		RssParser parser = new RssParser(url.openStream(),"utf-8");
//		Log.i("rss", parser.getItems().size()+"");
//	}
//	public static void main(String[] args) throws Exception{
//		URL url = new URL("http://news.163.com/special/00011K6L/rss_newstop.xml");
//		RssParser parser = new RssParser(url.openStream());
//		System.out.println(parser.getItems().size());
//	}
//}
